<?php
$_doctorHealthAdvices = array();
$row = 0;
$col = 0;
foreach ($doctorHealthAdvices as $doctorHealthAdvice)
{
    $_doctorHealthAdvices[$row][$col] = $doctorHealthAdvice;
    $col++;

    // make sure you create a row of 4 reviews
    if (fmod($col, 3) == 0)
    {
        $col = 0;
        $row++;
    }
}
?>
<?php if (count($_doctorHealthAdvices) > 0): ?>
    <?php foreach ($_doctorHealthAdvices as $_row): ?>
        <div class="doctor-health-advice-row">
            <?php foreach ($_row as $_doctorHealthAdvice): ?>
                <?php include_partial("doctor_health_advice/advice", array("doctorHealthAdvice" => $_doctorHealthAdvice)) ?>
            <?php endforeach; ?>
        </div>
    <?php endforeach; ?>
<?php else: ?>
    <div class="no-items">Currently there's no health advice provided :)</div>
<?php endif; ?>
